package com.lanou3g.hw0518.pojo;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * If there are no bugs, it was created by Chen FengYao on 2018/5/19;
 * Otherwise, I don't know who created it either
 */

public class User {
    private String username;
    private String password;
    private String nickName;
    private String gender;
    private List<String> hobbies;

    public String getUsername() {
        return username;
    }

    public User setUsername(String username) {
        this.username = username;
        return this;
    }

    public String getPassword() {
        return password;
    }

    public User setPassword(String password) {
        this.password = password;
        return this;
    }

    public String getNickName() {
        return nickName;
    }

    public User setNickName(String nickName) {
        this.nickName = nickName;
        return this;
    }

    public String getGender() {
        return gender;
    }

    public User setGender(String gender) {
        this.gender = gender;
        return this;
    }

    public List<String> getHobbies() {
        return hobbies;
    }

    public User setHobbies(List<String> hobbies) {
        this.hobbies = hobbies;
        return this;
    }
    public  User setHobbies(String[] hobbies) {
        // 使用Arrays 工具类的asList方法
        // 把数组转换成 List集合
        this.hobbies=Arrays.asList(hobbies);
        return this;
    }
}
